https://developer.apple.com/library/content/releasenotes/General/WhatsNewIniOS/Articles/
iOS 11.0
This article summarizes the key developer-related features introduced in iOS 11, which runs on currently shipping iOS devices. The article also lists the documents that describe new features in more detail.
For late-breaking news and information about known issues, see iOS 11 Release Notes.
For a complete list of new, modified, and deprecated APIs, see Apple Developer Documentation.
To learn about new features for SafariServices and WebKit, see What’s New in Safari.
To learn about what’s new in Swift, see Swift Language in What’s New in Xcode and The Swift Programming Language (Swift 4.1).
General
- New in iOS 11.0 - Support for binary (nontext) barcodes.
- Added APIs to AV Foundation, Core Image, and SiriKit to support detection, decoding, and creation of barcodes with binary content.
- Added a new barcode descriptor object,
CIBarcodeDescriptor
to Core Image to provide interoperability with AV Foundation and the Vision APIs.
- New in iOS 11.0 - MusicKit.
- MusicKit gives your app access to the full Apple Music catalog, and to the user’s library.
- Added and updated functionality in StoreKit for retrieving client tokens and storefront identifiers.
- Added and updated functionality in Media Player to enable station playback.
- Added display of custom messages in the Apple Music subscriber setup flow.
App Frameworks
New in iOS 11.0 - Support for drag and drop. Drag and drop in iOS lets a user drag items from one location to another onscreen, either within a single app or in different apps.
- Added functionally to identify views as drag sources and as drag destinations.
- Added customizable previews and set-down animations.
See Drag and Drop in the documentation.
New in iOS 11.0 - Browsing local and iCloud documents.
- Added view controllers for browsing documents stored locally and in the cloud. See
UIDocumentBrowserViewController
andUIDocumentBrowserTransitionController
. - Added
UIDocumentBrowserAction
, an object for creating a custom action for the document browser. - Added the FileProvider and FileProviderUI frameworks for adding third party storage services.
- Added view controllers for browsing documents stored locally and in the cloud. See
Improved Dynamic Type support.
- Added
UIFontMetrics
, an object for creating custom fonts that scale based on the currently selected text size. - Updated Auto Layout to dynamically adjust spacing based on the font sizes when a baseline anchor is part of a constraint that uses the system spacing.
- Added an attribute to preserve vector data for PDF assets to enable smooth scaling. You can use this attribute to show a larger version of bar items and segmented control items, as well as to adjust image sizes to match the user’s text size. To enable scaling in the PDF, in the asset catalog Attributes inspector, select “Preserve vector data” for the PDF to enable scaling.
- Added
UIAccessibilityContentSizeCategoryImageAdjusting
, a protocol for scaling images for accessibility text sizes.
- Added
Improved Auto Layout support for Dynamic Type.
- Updated
NSLayoutXAxisAnchor
andNSLayoutYAxisAnchor
to provide factory methods that create constraints using the system spacing between two anchors. Previously the only way to create such a constraint was with the dash (-
) in the Visual Format Language. - Added an option to
NSLayoutFormatOptions
for creating a Visual Format Language string that uses baseline-to-baseline spacing. - Updated
UIStackView
to enable system spacing and customized spacing.
- Updated
Updated text content to work with App Password autofill.
- Added
username
andpassword
properties toUITextContentType
.
- Added
Added
primaryEdge
, a property ofUISplitViewController
for setting the side for the master view controller.Added
sectionInsetReference
, a new enum property forUICollectionViewFlowLayout
, that specifies the boundary used for relative section insets.Updated keyboard extensions.
- Added
selectedText
, a property ofUITextDocumentProxy
that returns the currently selected text in the document. - Added
documentIdentifier
, a property ofUITextDocumentProxy
that specifies whether the user is navigating to a new text widget. - Added
hasFullAccess
, a property ofUIInputViewController
that checks keyboard permissions. - Added
needsInputModeSwitchKey
, a property ofUIInputViewController
to control the display of the input-mode switch key. - Added new system permissions in Settings for app access to included keyboard extensions.
- Added
Improved API for available storage space.
- Added new keys to the
URL
class for different usage scenarios.- The
volumeAvailableCapacityForImportantUsageKey
key returns total amount of bytes available for operations explicitly requested by user or essential to proper functioning of your apps. - The
volumeAvailableCapacityForOpportunisticUsageKey
key returns total amount of bytes available for storing nonessential items, such as content predownloaded for performance that may or may not get used by the user.
- The
- Added new keys to the
Graphics and Games
- New in iOS 11.0 - Support for augmented reality.
- Added the ARKit framework that combines device motion tracking, camera scene capture, advanced scene processing, and display conveniences to simplify the task of building an AR experience.
- New in iOS 11.0 - High performance image analysis.
- Added the Vision framework for detecting faces, bar codes, text, image horizon, and rectangular regions.
- Provided support for integrating the Vision framework with Core ML to run custom models on images.
- Added object-tracking in video.
- Added support for image registration.
- New in iOS 11.0 - Ability to write custom image blending kernels for Core Image.
- Added
CIBlendKernel
, a special type ofCIColorKernel
to blend two images (supported byCIRenderDestination
andCIImageAccumulator
). - Added
init(functionName:fromMetalLibraryData:)
toCIKernel
for writing kernels using Metal to benefit from the improved language features and the reduced compile time.
- Added
- New in iOS 11.0 - Lightweight render destination.
- Added
CIRenderDestination
, an object for creating renderers that return to the caller after the work has been issued. You can specify all the destination attributes of the renderer for different destinations, including a surface (IOSurface
), Core Video pixel buffer (CVPixelBuffer
), GL textures, Metal textures, and memory.
- Added
- Extended the ReplayKit framework.
- Updated
RPScreenRecorder
for screen capture and back camera support.
- Updated
- Added new Core Image filters
CITextImageGenerator
,CIColorCurves
,CILabDeltaE
,CIBokehBlur
,CIMinMaxRed
, andCIBicubicScaleTransform
.
Metal 2
Metal 2 contains significant additions and updates to Metal, the Metal Shading Language, and the Metal Performance Shaders framework. Items below indicate where the updates occur:
– MTL: An update in the Metal framework.
– MSL: An update in the Metal Shading Language.
– MPS: An update in the Metal Performance Shaders framework.
- MPS: New in Metal 2 - Cross-platform Metal Performance Shaders support.
- All Metal Performance Shaders functionality is available in iOS 11.0, tvOS 11.0, and macOS 10.13.
- MPS: New in iOS 11.0 - Neural network support.
- Added support for neural networks to the Metal Performance Shaders framework.
- Added graphs to offer a higher level API for simplifying the creation of neural networks, including objects that allow state to be transferred between nodes in a neural network.
- Added convolutional neural networks (CNN) to support implementing and running deep learning using previously obtained training data.
- Added recurrent neural networks for implementing inference on images and matrices.
- New in iOS 11.0 - Argument buffers. Group your resources into an argument buffer (AB) to reduce CPU overhead.
- MSL: Added the
[[id(n)]]
attribute qualifier to identify resources in an AB structure. - MTL: Added the
MTLArgumentEncoder
protocol to encode resources into an AB.
- MSL: Added the
- MTL: New in iOS 11.0 - Programmable sample positions. Configure the position of samples when rendering to a multisampled render target.
- Updated the
MTLRenderPassDescriptor
class to set and get sample positions for a render pass.
- Updated the
- MSL: New in iOS 11.0 - Uniform type.
- Added the
uniform
type to declare variables that are uniform for all threads that execute the graphics or compute function of a draw or dispatch call.
- Added the
- MSL: New in iOS 11.0 - Array of samplers.
- Added the
array<sampler, size_t N>
type to store an array of samplers.
- Added the
- MTL: New in iOS 11.0 - BGR10A2 pixel format.
- Added the
bgr10A2Unorm
pixel format to present wide color content on P3 displays.
- Added the
- MPS: Added new filters.
- Added filters for image statistics, such as computing the mean and variance for an image region.
- Added filters for combining two images together, such as an element-wise sum.
- Added filters for matrix decomposition and solving, such as decomposition using Cholesky or LU (lower upper) factorization.
- MSL: Extended function specialization. Members of a structure used in a graphics, compute, or user function can be used with function constants.
- Extended
[[color(n)]]
and[[raster_order_group(index)]]
attribute qualifiers to work with function constants.
- Extended
- MTL: Extended vertex formats.
- Added new
MTLVertexFormat
values for small formats such aschar
,short
, andhalf
.
- Added new
- Added dual-source blending support to iOS. Output two source colors to a single render target in a fixed-function blending operation.
- MSL: Added a new
[[index(i)]]
attribute qualifier to the[[color(n)]]
attribute qualifier to output a second source color. - MTL: Updated
MTLBlendFactor
to operate on a second source color.
- MSL: Added a new
App Services
New in iOS 11.0 - Support for machine learning models.
- Added the Core ML framework for easily integrating machine learning models into apps.
New in iOS 11.0 - SiriKit support for visual codes.
- Added the Visual Codes domain to Sirkit to support showing visual codes for exchanging payment and contact information.
New in iOS 11.0 - SiriKit support for notes and to-do lists.
- Added the Lists and Notes domain to SiriKit to support using Siri to add notes, interact with to-do lists, and interact with reminders.
Added intents to SiriKit domains.
- Added ride canceling and feedback to the Ride Booking domain.
- Added transferring money and searching for accounts to the Payments domain.
New in iOS 11.0 - Find the heading of the device.
- Added
heading
toCMDeviceMotion
, a property that returns the heading angle with respect to theCMAttitudeReferenceFrame
. The returned value is the heading in degrees as adouble
. A negative value is returned when the reference frame isxArbitraryZVertical
orxArbitraryCorrectedZVertical
.
- Added
New in iOS 11.0 - Multipath TCP.
- Added support for using multiple interfaces, like Wi-Fi and cellular, to transmit a single data stream, by extending
URLSessionConfiguration
to support Multipath TCP as defined inIETF RFC 6824. SeeURLSessionConfiguration.MultipathServiceType
.
- Added support for using multiple interfaces, like Wi-Fi and cellular, to transmit a single data stream, by extending
New in iOS 11.0 - DNS Proxy.
- Added a new DNS Proxy app extension type to the Network Extension framework.
Enhanced end user transaction flow in Apple Pay.
- Added
PKPaymentError
to PassKit, a structure for detailed reporting of errors in a user’s shipping and payment information, and for authorization errors. Developers can use the information to provide a customized error string. - Updated the handler methods in
PKPaymentAuthorizationControllerDelegate
to receive aPKPaymentError
. - Updated
PKPaymentRequest
to usePKContactField
for contact information. - Added
supportedCountries
toPKPaymentRequest
for specifying supported countries for a transaction. - Added support for presenting payment buttons even if there are no supported payment methods in Wallet. Apple Pay now handles payment without leaving your app, and then returns to checkout.
- Added
New in iOS 11.0 - Promoting in-app purchases on the App Store.
- Developers can promote up to 20 in-app purchases on their App Store product page. Customers can start their purchase on the App Store, and then be taken to the app to complete the transaction.
- Added
paymentQueue(_:shouldAddStore:for:)
, a new method ofSKPaymentTransactionObserver
for promoted in-app purchases. Apps need to support this delegate for promoted in-app purchases to display on the App Store.
New in iOS 11.0 - Live messages.
Added
MSMessageLiveLayout
, a new message layout for showing live messages that can display dynamic content, such as games. Each live message has its ownMSMessagesAppViewController
, and there can be multiple active live messages on the screen at once.The following code shows adding a live message to a message stream, including an alternate layout for devices that do not support live messages.
|
**guard** **let** conversation = activeConversation **else** {
|
| —————————————- |
|fatalError("No active conversation")
|
|}
|
||
|**let** alternateLayout = MSMessageTemplateLayout()
|
|alternateLayout.image = UIImage(named: "SuperSweetGameImage")
|
|alternateLayout.caption = "$(\(conversation.localParticipantIdentifier)) wants to play a game!"
|
|**let** layout = MSMessageLiveLayout(alternateLayout: alternateLayout)
|
||
|**let** message = MSMessage()
|
|message.layout = layout
|
||
|conversation.insert(message, completionHandler: **nil**)
|
Enhanced triggers for HomeKit.
- Enhanced time-based conditions for triggers.
HMSignificantTimeEvent
specifies an offset from sunrise and sunset.HMCalendarEvent
specifies a date and time.HMDurationEvent
specifies a time interval. - Added
HMCharacteristicThresholdRangeEvent
to support tracking the state of an accessory within a range, such as running an action when the temperature is between 68 and 72 degrees. - Added
HMPresenceEvent
for adding a condition based on the presence or absence of users. - Updated
HMEventTrigger
to enable multiple recurrences of the event.
- Enhanced time-based conditions for triggers.
Added
home:didUpdateHomeHubState:
to support receiving updates of the home hub state.Updated MapKit for clearer display of developer data.
- Added
mutedStandard
, a new map display mode that emphasizes developer data. - Added properties to customize how annotations behave when collisions occur. Developers use a combination of
displayPriority
,collisionMode
, andclusteringIdentifier
to influence which annotations remain on the map.
- Added
Added the
authorizationStatus
method to theCMAltimiter
,CMPedometer
,CMMotionActivityManager
, andCMSensorRecorder
classes of the Core Motion framework. The method is used to determine if an app is authorized to recieve data from a source.
Media and Web
- New in iOS 11.0 - Support for High Efficiency Video Coding (HEVC). High Efficiency Video Coding (HEVC) is a new standard for video encoding that offers substantially better compression than H.264 at the same level of visual quality.
- Added support for using AV Foundation to play back movies containing HEVC-encoded tracks, and to capture and export videos.
- Added support for using
VideoToolbox
clients to encode and decode HEVC video bitstreams.
- New in iOS 11.0 - Support for High Efficiency Image Format (HEIF). High Efficiency Image Format (HEIF) is a new standard of image compression that nearly doubles current data compression ratios for the same level of image quality.
- Added functionality to the Photos and Core Image frameworks to display, encode, and export HEIF images.
- New in iOS 11.0 - Support for capturing and manipulating depth data, and enhanced photo capture.
- Added objects to AV Foundation for capturing and representing depth data. See
AVCaptureDepthDataOutput
,AVDepthData
, and related APIs. - Added
AVCapturePhoto
, an object that encapsulates the information for a captured photo and supports HEVC and HEIC encoded images. - Updated
AVCapturePhotoOutput
to provide more information about camera features and supported output formats.
- Added objects to AV Foundation for capturing and representing depth data. See
- New in iOS 11.0 - Automatic storage management.
- Added automatic storage management of HTTP live streaming assets to
AVAssetDownloadTask
. The system can automatically purge expired or unneeded downloads when space is required. Use priorities to influence the purging policy.
- Added automatic storage management of HTTP live streaming assets to
- New in iOS 11.0 - AirPlay 2.
- Improved AirPlay reliability for some audio playback interfaces in AV Foundation. To take advantage of the increased reliability, play audio using
AVPlayer
or the newAVSampleBufferAudioRenderer
object. - Added multiple speaker support to AirPlay for long-form audio, such as music and podcasts. To mark your application as presenting long-form audio, invoke the
AVAudioSession
methodsetCategory(_:mode:routeSharingPolicy:options:)
and useAVAudioSessionRouteSharingPolicyLongForm
as the parameter value. - Added
AVRoutePickerView
to the AVKit framework andAVRouteDetector
to the AVFoundation framework for enabling users to choose the route for playing content when multiple routes are available. UseAVRouteDetector
to determine if multiple routes are available when route detection is enabled. If multiple routes are available, useAVRoutePickerView
to present an interface for the user to choose the routes.
- Improved AirPlay reliability for some audio playback interfaces in AV Foundation. To take advantage of the increased reliability, play audio using
- Added FairPlay streaming key management.
- Improved the functionality of
AVContentKeySession
. UseAVContentKeySession
to initiate content key requests independent of playback or downloading of media assets. Objects conforming to theAVContentKeyRecipient
protocol, such asAVURLAsset
, can be added as a recipient toAVContentKeySession
to obtain access to existing content keys and initiate new content key requests
- Improved the functionality of
- Added more Live Photo adjustments.
- Added a collection of Live Photo adjustments, called effects, that render the live photo as Loop, Bounce, or Long Exposure. Unlike regular live photos, Loop and Bounce videos will play in a continuous loop.
- Added a
playbackStyle
, a new property that identifies how to present thePHAsset
to the user.
System
- New in iOS 11.0 - Hotspot configuration.
- Added a network extension for hotspot configuration. See
NEHotspotConfiguration
.
- Added a network extension for hotspot configuration. See
- New in iOS 11.0 - Detect NFC tags and read messages that contain NDEF data.
- Added Core NFC, a new framework for reading Near Field Communications (NFC) tags and data in NFC Data Exchange Format (NDEF.)
- Updated the Core Bluetooth framework.
- Added support for L2CAP Channels.
- Extended session restoration to work across Bluetooth resets and device reboots.
- Updated the APIs in the Core Bluetooth framework to match across iOS, tvOS, watchOS, and macOS, and marked the platform availability of each API.
- APFS is now the default filesystem.
- Added normalization-insensitive support for a case sensitive filesystem.
iOS 11.0
本文总结了iOS 11中引入的关键开发人员相关功能,该功能在当前正在运行的iOS设备上运行。本文还列出了更详细描述新功能的文档。
有关已知问题的最新消息和信息,请参阅iOS 11发行说明。
有关新的,已修改的和已弃用的API的完整列表,请参阅Apple开发人员文档。
要了解SafariServices和WebKit的新功能,请参阅Safari中的新增功能。
要了解Swift中的新功能,请参阅 Swift语言中的Xcode新增功能和Swift编程语言(Swift 4.1)。
一般
- iOS 11.0新增功能 - 支持二进制(非文本)条形码。
- 为AV Foundation,Core Image和SiriKit添加了API,以支持使用二进制内容检测,解码和创建条形码。
CIBarcodeDescriptor
向Core Image 添加了一个新的条形码描述符对象,以提供与AV Foundation和Vision API的互操作性。
- iOS 11.0新增功能 - MusicKit。
- MusicKit可让您的应用程序访问完整的Apple音乐目录以及用户的图书馆。
- 在StoreKit中添加并更新了用于检索客户端令牌和店面标识符的功能。
- 在媒体播放器中添加和更新功能以启用电台播放。
- 在Apple Music用户设置流程中添加了自定义消息的显示。
应用程序框架
iOS 11.0新增功能 - 支持拖放操作。通过在iOS中拖放,用户可以将项目从一个位置拖到另一个位置,可以在单个应用程序中或在不同的应用程序中进行拖放。
- 新增功能可将视图识别为拖动源和拖动目标。
- 添加了可自定义的预览和设置动画。
请参阅文档中的拖放。
iOS 11.0新增功能 - 浏览本地和iCloud文档。
- 添加了用于浏览本地和云中存储文件的视图控制器。见
UIDocumentBrowserViewController
和UIDocumentBrowserTransitionController
。 - 添加
UIDocumentBrowserAction
了一个用于为文档浏览器创建自定义操作的对象。 - 添加了FileProvider和FileProviderUI框架以添加第三方存储服务。
请参阅向应用程序添加文档浏览器。
- 添加了用于浏览本地和云中存储文件的视图控制器。见
改进的动态类型支持。
- 添加
UIFontMetrics
了一个对象,用于创建基于当前选定文本大小进行缩放的自定义字体。 - 当基线锚点是使用系统间距的约束的一部分时,更新了自动布局以根据字体大小动态调整间距。
- 添加了一个属性以保留PDF资产的矢量数据以启用平滑缩放。您可以使用此属性显示更大版本的条形项目和分段控制项目,以及调整图像大小以匹配用户的文本大小。要在PDF中启用缩放,请在资产目录属性检查器中为PDF选择“保留矢量数据”以启用缩放。
- 新增
UIAccessibilityContentSizeCategoryImageAdjusting
了一个协议,用于缩放可访问文本大小的图像。
- 添加
改进了动态类型的自动布局支持。
- 更新
NSLayoutXAxisAnchor
并NSLayoutYAxisAnchor
提供工厂方法,使用两个锚点之间的系统间距创建约束。以前,创建这种约束的唯一方法是使用-
Visual Format Language中的dash()。 - 添加了一个
NSLayoutFormatOptions
用于创建使用基线到基线间距的视觉格式语言字符串的选项。 - 已更新
UIStackView
以启用系统间距和自定义间距。
- 更新
更新文本内容以使用应用程序密码自动填充。
- 已添加
username
和password
属性UITextContentType
。
- 已添加
新增
primaryEdge
了一个UISplitViewController
用于设置主视图控制器侧的属性。新增
sectionInsetReference
了一个新的enum属性UICollectionViewFlowLayout
,用于指定用于相对节插页的边界。更新了键盘扩展。
- 已添加
selectedText
,该属性UITextDocumentProxy
返回文档中当前选定的文本。 - 增加
documentIdentifier
了一个属性,UITextDocumentProxy
用于指定用户是否正在导航到新的文本小部件。 - 增加
hasFullAccess
了一个UIInputViewController
检查键盘权限的属性。 - 增加
needsInputModeSwitchKey
了UIInputViewController
控制输入模式切换键显示的属性。 - 在设置中添加新的系统权限,以便对包含的键盘扩展程序进行应用访
- 已添加
改进了可用存储空间的API。
URL
为不同的使用场景添加了新的关键字。- 该
volumeAvailableCapacityForImportantUsageKey
键返回用户明确请求的操作的可用字节总数,或者返回应用程序正常运行所必需的基本字节数。 - 该
volumeAvailableCapacityForOpportunisticUsageKey
键返回可用于存储非必需项目的总字节数,例如为可能会或可能不会被用户使用的性能而预先加载的内容。
- 该
图形和游戏
- iOS 11.0新增功能 - 支持增强现实。
- iOS 11.0新增功能 - 高性能图像分析。
- 添加了Vision框架,用于检测面部,条形码,文本,图像视野和矩形区域。
- 为将Vision框架与Core ML集成在图像上运行定制模型提供了支持。
- 在视频中添加了对象跟踪。
- 增加了对图像注册的支持。
- iOS 11.0中的新功能 - 可以为Core Image编写自定义图像混合内核。
- 添加
CIBlendKernel
了一种特殊的类型CIColorKernel
来混合两个图像(由CIRenderDestination
and 支持CIImageAccumulator
)。 - 添加
init(functionName:fromMetalLibraryData:)
到CIKernel
编写使用金属从改进的语言特性,并减少编译时间受益内核。
- 添加
- iOS 11.0中的新功能 - 轻量级渲染目标。
- 添加
CIRenderDestination
了一个用于创建呈现器的对象,该对象在作品发布后返回给调用者。您可以为不同的目标指定渲染器的所有目标属性,包括surface(IOSurface
),Core Video像素缓冲区(CVPixelBuffer
),GL纹理,Metal贴图和内存。
- 添加
- 扩展了ReplayKit框架。
- 更新
RPScreenRecorder
了屏幕捕获和背部照相机支持。
- 更新
- 增加了新的核心图像过滤器
CITextImageGenerator
,CIColorCurves
,CILabDeltaE
,CIBokehBlur
,CIMinMaxRed
,和CIBicubicScaleTransform
。
Metal2
Metal 2包含对Metal,Metal Shading Language和Metal Performance Shaders框架的重要补充和更新。下面的项目表示更新发生的地方:
MTL:Metal框架中的更新。
MSL:金属着色语言的更新。
MPS:金属性能着色器框架中的更新。
- MPS:金属2中的新功能 - 跨平台金属性能着色器支持。
- 所有Metal Performance Shaders功能在iOS 11.0,tvOS 11.0和macOS 10.13中均可用。
- MPS:iOS 11.0新增功能 - 神经网络支持。
- 在金属性能着色器框架中增加了对神经网络的支持。
- 增加图形以提供更高级别的API,用于简化神经网络的创建,包括允许状态在神经网络中的节点之间传输的对象。
- 增加了卷积神经网络(CNN),以支持使用先前获得的训练数据实施和运行深度学习。
- 添加循环神经网络来实现对图像和矩阵的推断。
- iOS 11.0新增功能 - 参数缓冲区。将您的资源分组到一个参数缓冲区(AB)以减少CPU开销。
- MSL:添加了
[[id(n)]]
属性限定符来标识AB结构中的资源。 - MTL:增加了
MTLArgumentEncoder
将资源编码到AB 的协议。
- MSL:添加了
- MTL:iOS 11.0新增功能 - 可编程样本位置。配置渲染到多重采样渲染目标时的样本位置。
- 更新了
MTLRenderPassDescriptor
要设置的类并获取渲染过程的样本位置。
- 更新了
- MSL:iOS 11.0新增功能 - 统一类型。
- 添加
uniform
类型来声明执行draw或dispatch调用的图形或计算函数的所有线程的统一变量。
- 添加
- MSL:iOS 11.0中的新功能 - 采样器阵列。
- 添加了
array<sampler, size_t N>
用于存储采样器数组的类型。
- 添加了
- MTL:iOS 11.0中的新功能 - BGR10A2像素格式。
- 添加了
bgr10A2Unorm
像素格式以在P3显示器上显示宽色彩内容。
- 添加了
- MPS:增加了新的过滤器。
- 为图像统计添加了过滤器,例如计算图像区域的均值和方差。
- 增加了用于将两个图像组合在一起的过滤器,例如按元素求和。
- 为矩阵分解和求解增加了过滤器,例如使用Cholesky或LU(较低上层)分解的分解。
- MSL:扩展功能专业化。用于图形,计算或用户函数的结构成员可以与函数常量一起使用。
- 扩展
[[color(n)]]
和[[raster_order_group(index)]]
属性限定符与函数常量一起使用。
- 扩展
- MTL:扩展顶点格式。
- 增加了新
MTLVertexFormat
的小格式,如价值观char
,short
和half
。
- 增加了新
- 为iOS添加了双源混合支持。在固定功能混合操作中将两种源颜色输出到单个渲染目标。
- MSL:
[[index(i)]]
向[[color(n)]]
属性限定符添加了新的属性限定符以输出第二个源颜色。 - MTL:已更新
MTLBlendFactor
为以第二种来源颜色进行操作。
- MSL:
应用服务
iOS 11.0新增功能 - 支持机器学习模型。
- 增加了核心ML框架,可轻松将机器学习模型集成到应用程序中。
iOS 11.0新增功能 - SiriKit支持可视代码。
- 向Sirkit 添加了可视代码域,以支持显示交换付款和联系信息的可视代码。
iOS 11.0新增功能 - SiriKit支持笔记和待办事项列表。
- 为SiriKit 添加了列表和注释域,以支持使用Siri添加注释,与待办事项列表进行交互以及与提醒进行交互。
增加了SiriKit域的意图。
iOS 11.0中的新功能 - 查找设备的标题。
- 添加
heading
到CMDeviceMotion
一个属性,该属性返回与该方向相关的标题角度CMAttitudeReferenceFrame
。返回的值是以度为单位的标题double
。参考帧为xArbitraryZVertical
或时,返回负值xArbitraryCorrectedZVertical
。
- 添加
iOS 11.0中的新功能 - 多路径TCP。
- 通过扩展
URLSessionConfiguration
以支持IETF RFC 6824中定义的多路径TCP,增加了对使用多个接口(如Wi-Fi和蜂窝)传输单个数据流的支持。看URLSessionConfiguration.MultipathServiceType
。
- 通过扩展
iOS 11.0中的新功能 - DNS代理。
- 向网络扩展框架添加了新的DNS代理应用扩展类型。
增强Apple Pay中的最终用户交易流程。
- 添加
PKPaymentError
到PassKit中,用于详细报告用户运输和付款信息中的错误以及授权错误的结构。开发人员可以使用这些信息来提供自定义的错误字符串。 - 更新处理器方法
PKPaymentAuthorizationControllerDelegate
以接收一个PKPaymentError
。 - 已更新
PKPaymentRequest
以PKContactField
用于联系信息。 - 添加
supportedCountries
到PKPaymentRequest
指定支持的国家的交易。 - 即使在电子钱包中没有支持的付款方式,也添加了对付款按钮的支持。Apple Pay现在可以在不离开您的应用程序的情况下处理付款,然后返回结帐。
- 添加
iOS 11.0新增功能 - 在App Store中推广应用程序内购买。
- 开发人员可以在其App Store产品页面上推广最多20个应用内购买。客户可以在App Store上开始购买,然后转到应用程序完成交易。
- 新增
paymentQueue(_:shouldAddStore:for:)
了一种SKPaymentTransactionObserver
促销应用内购买的新方法。应用程序需要支持此代理才能在应用商店中显示促销的应用内购买内容。
iOS 11.0中的新功能 - 实时消息。
新增
MSMessageLiveLayout
了一个新的消息布局,用于显示可显示动态内容的实时消息,如游戏。每条实时消息都有自己的消息MSMessagesAppViewController
,并且一次可以在屏幕上显示多个活动的实时消息。以下代码显示向消息流添加实时消息,包括不支持实时消息的设备的备用布局。
|
**警卫** **让**对话= activeConversation **其他** {
|
| —————————————- |
|fatalError(“没有活跃的对话”)
|
|}
|
||
|**让** alternateLayout = MSMessageTemplateLayout()
|
|alternateLayout.image = UIImage(名为:“SuperSweetGameImage”)
|
|alternateLayout.caption =“$(\(conversation.localParticipantIdentifier))想玩游戏!”
|
|**让** layout = MSMessageLiveLayout(alternateLayout:alternateLayout)
|
||
|**让** message = MSMessage()
|
|message.layout =布局
|
||
|conversation.insert(message,completionHandler:**nil**)
|
增强了HomeKit的触发器。
- 增强触发器的基于时间的条件。
HMSignificantTimeEvent
指定日出和日落的偏移量。HMCalendarEvent
指定日期和时间。HMDurationEvent
指定一个时间间隔。 - 新增
HMCharacteristicThresholdRangeEvent
支持跟踪某个范围内的附件状态,例如温度在68到72度之间时执行操作。 - 添加
HMPresenceEvent
用于根据用户的存在或不存在添加条件。 - 已更新
HMEventTrigger
以启用事件的多次重复。
- 增强触发器的基于时间的条件。
添加
home:didUpdateHomeHubState:
为支持接收家庭集线器状态的更新。更新MapKit以更清晰地显示开发人员数据。
- 新增
mutedStandard
了一种强调开发者数据的新地图显示模式。 - 添加属性以自定义冲突发生时注释行为的方式。开发人员使用的组合
displayPriority
,collisionMode
以及clusteringIdentifier
对影响哪个注解持续显示在地图上。
- 新增
添加
authorizationStatus
方法的CMAltimiter
,CMPedometer
,CMMotionActivityManager
,和CMSensorRecorder
类核心运动框架。该方法用于确定应用程序是否有权从源接收数据。
媒体和网络
- iOS 11.0新增功能 - 支持高效视频编码(HEVC)。高效视频编码(HEVC)是视频编码的新标准,在视觉质量相同的情况下,其压缩比H.264要好得多。
- 增加了对使用AV Foundation播放包含HEVC编码音轨的电影以及捕获和导出视频的支持。
- 增加了对使用
VideoToolbox
客户端编码和解码HEVC视频比特流的支持。
- iOS 11.0新增功能 - 支持高效图像格式(HEIF)。高效率图像格式(HEIF)是图像压缩的新标准,几乎使当前数据压缩率翻倍达到相同的图像质量水平。
- 为Photos和Core Image框架添加了显示,编码和导出HEIF图像的功能。
- iOS 11.0新增功能 - 支持捕获和处理深度数据以及增强图片捕获。
- 向AV Foundation添加对象以捕获和表示深度数据。请参阅
AVCaptureDepthDataOutput
,AVDepthData
和相关的API。 - 添加
AVCapturePhoto
了一个对象,该对象封装了拍摄照片的信息并支持HEVC和HEIC编码图像。 - 已更新
AVCapturePhotoOutput
,提供有关相机功能和支持的输出格式的更多信息。
- 向AV Foundation添加对象以捕获和表示深度数据。请参阅
- iOS 11.0新增功能 - 自动存储管理。
- 增加了HTTP实时流媒体资产的自动存储管理
AVAssetDownloadTask
。当需要空间时,系统可以自动清除过期或不需要的下载。使用优先级来影响清除策略。
- 增加了HTTP实时流媒体资产的自动存储管理
- iOS 11.0新增功能 - AirPlay 2。
- AV Foundation中某些音频播放界面的AirPlay可靠性得到改善。要利用增强的可靠性,请使用
AVPlayer
或使用新AVSampleBufferAudioRenderer
对象播放音频。 - 为AirPlay增加了多种扬声器支持,用于音乐和播客等长形式音频。要将您的应用程序标记为呈现长形式音频,请调用该
AVAudioSession
方法setCategory(_:mode:routeSharingPolicy:options:)
并将其AVAudioSessionRouteSharingPolicyLongForm
用作参数值。 - 添加
AVRoutePickerView
到AVKit框架和AVRouteDetector
AVFoundation框架中,使用户能够在多条路线可用时选择播放内容的路线。使用AVRouteDetector
以确定是否启用路由检测时,多条路线可供选择。如果有多条路由可用,请使用AVRoutePickerView
为用户提供一个接口来选择路由。
- AV Foundation中某些音频播放界面的AirPlay可靠性得到改善。要利用增强的可靠性,请使用
- 增加了FairPlay流媒体密钥管理。
- 改进的功能
AVContentKeySession
。使用AVContentKeySession
启动独立播放或媒体资产的下载的内容密钥请求。符合AVContentKeyRecipient
协议的对象(例如AVURLAsset
)可以作为接收者添加AVContentKeySession
以获得对现有内容密钥的访问并发起新的内容密钥请求
- 改进的功能
- 增加了更多实时图片调整。
- 添加了一组实时照片调整,称为效果,可将现场照片渲染为循环,反弹或长时间曝光。与普通的实时照片不同,循环和跳动视频将连续循环播放。
- 添加了
playbackStyle
一个新属性,用于标识如何向PHAsset
用户展示。
系统
- iOS 11.0中的新增功能 - 热点配置。
- 为热点配置添加了网络扩展。看
NEHotspotConfiguration
。
- 为热点配置添加了网络扩展。看
- iOS 11.0新增功能 - 检测NFC标签并读取包含NDEF数据的消息。
- 新增核心NFC,阅读近场通信(NFC)标签和数据在NFC数据交换格式的新框架(NDEF)。
- 更新了核心蓝牙框架。
- 增加了对L2CAP频道的支持。
- 扩展的会话恢复工作可通过蓝牙重置和设备重启进行。
- 更新Core蓝牙框架中的API 以跨越iOS,tvOS,watchOS和macOS进行匹配,并标记每个API的平台可用性。
- APFS现在是默认的文件系统。
- 为区分大小写的文件系统增加了对规范化不敏感的支持。